﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace LiteQueryWPF.Interfaces
{
    public interface IFuncPanel
    {
        /// <summary>
        /// 导出数据面板中的数据到Excel
        /// </summary>
        /// <param name="data">数据源</param>
        /// <param name="path">Excel文件的全路径</param>
        /// <returns>是否导出成功</returns>
        Tuple<bool, Exception> ExportToExcel(DataTable data, string path);

        /// <summary>
        /// 通过SQL查询数据结果, 并返回DataSet
        /// </summary>
        /// <param name="dbpath"></param>
        /// <param name="sql"></param>
        /// <returns>查询结果</returns>
        DataSet Query(string dbpath, string sql);
    }
}
